package com.ztesoft.web.baseconfig.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class DmDataStateArg {
    private String pk_name = "DM_PLAN_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<DmDataStateCriteria> oredCriteria;

    public DmDataStateArg() {
        oredCriteria = new ArrayList<DmDataStateCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<DmDataStateCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(DmDataStateCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public DmDataStateCriteria or() {
    	DmDataStateCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DmDataStateCriteria createCriteria() {
    	DmDataStateCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected DmDataStateCriteria createCriteriaInternal() {
    	DmDataStateCriteria criteria = new DmDataStateCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<DmDataStateCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<DmDataStateCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<DmDataStateCriterion> getAllCriteria() {
            return criteria;
        }

        public List<DmDataStateCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new DmDataStateCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DmDataStateCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DmDataStateCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new DmDataStateCriterion(condition, value1, value2));
        }

        public DmDataStateCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (DmDataStateCriteria) this;
        }
        public DmDataStateCriteria andDmPlanIdIsNull() {
            addCriterion("DM_PLAN_ID is null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdIsNotNull() {
            addCriterion("DM_PLAN_ID is not null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdEqualTo(Integer value) {
            addCriterion("DM_PLAN_ID =", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotEqualTo(Integer value) {
            addCriterion("DM_PLAN_ID <>", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdGreaterThan(Integer value) {
            addCriterion("DM_PLAN_ID >", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("DM_PLAN_ID >=", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdLessThan(Integer value) {
            addCriterion("DM_PLAN_ID <", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdLessThanOrEqualTo(Integer value) {
            addCriterion("DM_PLAN_ID <=", value, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdLike(Integer value) {
            addCriterion("DM_PLAN_ID like ", value, "DM_PLAN_ID", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotLike(Integer value) {
            addCriterion("DM_PLAN_ID  not like ", value, "DM_PLAN_ID", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdLeftLike(Integer value) {
            addCriterion("DM_PLAN_ID like ", value, "DM_PLAN_ID", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotLeftLike(Integer value) {
            addCriterion("DM_PLAN_ID  not like ", value, "DM_PLAN_ID", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdRightLike(Integer value) {
            addCriterion("DM_PLAN_ID like ", value, "DM_PLAN_ID", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotRightLike(Integer value) {
            addCriterion("DM_PLAN_ID  not like ", value, "DM_PLAN_ID", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdIn(List<Integer> values) {
            addCriterion("DM_PLAN_ID  in ", values, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotIn(List<Integer> values) {
            addCriterion("DM_PLAN_ID not in ", values, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdBetween(Integer value1, Integer value2) {
            addCriterion("DM_PLAN_ID between ", value1, value2, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmPlanIdNotBetween(Integer value1, Integer value2) {
            addCriterion("DM_PLAN_ID not between ", value1, value2, "DM_PLAN_ID");
            return (DmDataStateCriteria) this;
        }
        public DmDataStateCriteria andDmTaskIdIsNull() {
            addCriterion("DM_TASK_ID is null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdIsNotNull() {
            addCriterion("DM_TASK_ID is not null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdEqualTo(Integer value) {
            addCriterion("DM_TASK_ID =", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotEqualTo(Integer value) {
            addCriterion("DM_TASK_ID <>", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdGreaterThan(Integer value) {
            addCriterion("DM_TASK_ID >", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("DM_TASK_ID >=", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdLessThan(Integer value) {
            addCriterion("DM_TASK_ID <", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdLessThanOrEqualTo(Integer value) {
            addCriterion("DM_TASK_ID <=", value, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdLike(Integer value) {
            addCriterion("DM_TASK_ID like ", value, "DM_TASK_ID", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotLike(Integer value) {
            addCriterion("DM_TASK_ID  not like ", value, "DM_TASK_ID", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdLeftLike(Integer value) {
            addCriterion("DM_TASK_ID like ", value, "DM_TASK_ID", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotLeftLike(Integer value) {
            addCriterion("DM_TASK_ID  not like ", value, "DM_TASK_ID", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdRightLike(Integer value) {
            addCriterion("DM_TASK_ID like ", value, "DM_TASK_ID", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotRightLike(Integer value) {
            addCriterion("DM_TASK_ID  not like ", value, "DM_TASK_ID", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdIn(List<Integer> values) {
            addCriterion("DM_TASK_ID  in ", values, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotIn(List<Integer> values) {
            addCriterion("DM_TASK_ID not in ", values, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdBetween(Integer value1, Integer value2) {
            addCriterion("DM_TASK_ID between ", value1, value2, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andDmTaskIdNotBetween(Integer value1, Integer value2) {
            addCriterion("DM_TASK_ID not between ", value1, value2, "DM_TASK_ID");
            return (DmDataStateCriteria) this;
        }
        public DmDataStateCriteria andStateIsNull() {
            addCriterion("STATE is null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateIsNotNull() {
            addCriterion("STATE is not null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateEqualTo(Integer value) {
            addCriterion("STATE =", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotEqualTo(Integer value) {
            addCriterion("STATE <>", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateGreaterThan(Integer value) {
            addCriterion("STATE >", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("STATE >=", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateLessThan(Integer value) {
            addCriterion("STATE <", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateLessThanOrEqualTo(Integer value) {
            addCriterion("STATE <=", value, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateLike(Integer value) {
            addCriterion("STATE like ", value, "STATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotLike(Integer value) {
            addCriterion("STATE  not like ", value, "STATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateLeftLike(Integer value) {
            addCriterion("STATE like ", value, "STATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotLeftLike(Integer value) {
            addCriterion("STATE  not like ", value, "STATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateRightLike(Integer value) {
            addCriterion("STATE like ", value, "STATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotRightLike(Integer value) {
            addCriterion("STATE  not like ", value, "STATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateIn(List<Integer> values) {
            addCriterion("STATE  in ", values, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotIn(List<Integer> values) {
            addCriterion("STATE not in ", values, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateBetween(Integer value1, Integer value2) {
            addCriterion("STATE between ", value1, value2, "STATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateNotBetween(Integer value1, Integer value2) {
            addCriterion("STATE not between ", value1, value2, "STATE");
            return (DmDataStateCriteria) this;
        }
        public DmDataStateCriteria andStateDateIsNull() {
            addCriterion("STATE_DATE is null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateIsNotNull() {
            addCriterion("STATE_DATE is not null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateEqualTo(String value) {
            addCriterion("STATE_DATE =", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotEqualTo(String value) {
            addCriterion("STATE_DATE <>", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateGreaterThan(String value) {
            addCriterion("STATE_DATE >", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateGreaterThanOrEqualTo(String value) {
            addCriterion("STATE_DATE >=", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateLessThan(String value) {
            addCriterion("STATE_DATE <", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateLessThanOrEqualTo(String value) {
            addCriterion("STATE_DATE <=", value, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateLeftLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotLeftLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateRightLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotRightLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateIn(List<String> values) {
            addCriterion("STATE_DATE  in ", values, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotIn(List<String> values) {
            addCriterion("STATE_DATE not in ", values, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateBetween(String value1, String value2) {
            addCriterion("STATE_DATE between ", value1, value2, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andStateDateNotBetween(String value1, String value2) {
            addCriterion("STATE_DATE not between ", value1, value2, "STATE_DATE");
            return (DmDataStateCriteria) this;
        }
        public DmDataStateCriteria andCreateDateIsNull() {
            addCriterion("CREATE_DATE is null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateIsNotNull() {
            addCriterion("CREATE_DATE is not null");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateEqualTo(String value) {
            addCriterion("CREATE_DATE =", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotEqualTo(String value) {
            addCriterion("CREATE_DATE <>", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateGreaterThan(String value) {
            addCriterion("CREATE_DATE >", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateGreaterThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE >=", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateLessThan(String value) {
            addCriterion("CREATE_DATE <", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateLessThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE <=", value, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 1);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateLeftLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotLeftLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 0);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateRightLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotRightLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 2);
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateIn(List<String> values) {
            addCriterion("CREATE_DATE  in ", values, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotIn(List<String> values) {
            addCriterion("CREATE_DATE not in ", values, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateBetween(String value1, String value2) {
            addCriterion("CREATE_DATE between ", value1, value2, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

        public DmDataStateCriteria andCreateDateNotBetween(String value1, String value2) {
            addCriterion("CREATE_DATE not between ", value1, value2, "CREATE_DATE");
            return (DmDataStateCriteria) this;
        }

    }

    public static class DmDataStateCriteria extends GeneratedCriteria {

        protected DmDataStateCriteria() {
            super();
        }
    }

    public static class DmDataStateCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected DmDataStateCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected DmDataStateCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected DmDataStateCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected DmDataStateCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected DmDataStateCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected DmDataStateCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}